<template>
  <div>
    <div  :class="{showAnimation? '':'animation-box'}">{{num}}</div>
   <button class="btn" @click="btnClick">+1</button>
  </div>
 

</template>

<script>
  export default {
    name: 'search',
    props:['model'],
    data(){
      return{
        num:0
      }
    },
    methods:{
      btnClick(){
        this.num++
      }
    }
  }
</script>

<style scoped>

.btn{
  display: block;
  margin: auto;
  margin-top: 20px;
}
.animation-box{
  margin: auto;
  width: 100px;
  height:100px;
  display: flex;
  justify-content: center;
  align-items:center;
  border: 40px solid black;
}

.animation{
  animation: example 3s infinite;
  animation-delay:1s;
  animation-timing-function:linear;
  animation-fill-mode: both;
}

@keyframes example {
  0% {background-color: lightskyblue;}

  50%{background-color: white;}

  100% {background-color: lightskyblue; }
}


</style>